const pinyin = require('pinyin')

const str = pinyin('行列')
// [ [ 'háng' ], [ 'liè' ] ]
console.log(pinyin('行列'))

console.log(str[0][0].slice(0, 1).toUpperCase())

